﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.quest.Display {
    import Events.*;
    import flash.utils.*;
    import Display.DialogUI.*;
    import Transactions.*;
    import Classes.util.*;

    public class CityNameDialog extends InputTextDialog {

        public var m_inputType:String;

        public function CityNameDialog(_arg1:Object=null, _arg2:Boolean=false, _arg3:String="rename_city", _arg4:int=13, _arg5:Function=null){
            this.m_inputType = _arg3;
            var _local6:String = ZLoc.t("Quest", "NameYourCity_inputLabel");
            var _local7:String = ZLoc.t("Quest", "NameYourCity_inputField", {name:ZLoc.tn(Global.player.firstName)});
            super("", "ATownIsBorn", _local6, _local7, Global.gameSettings.getInt("maxCityNameLength", 15), _arg4, this.setCityName, true);
        }
        protected function setCityName(_arg1:GenericPopupEvent):void{
            Global.player.cityName = this.m_textField.text;
            GameTransactionManager.addTransaction(new TRenameCity(this.m_textField.text), true, true);
        }
        override protected function createDialogView(_arg1:Dictionary):GenericDialogView{
            var _local2:CityNameDialogView = new CityNameDialogView(_arg1, m_message, m_title, m_inputLabel, m_inputField, m_type, m_callback);
            m_textField = _local2.textField;
            return (_local2);
        }

    }
}//package Modules.quest.Display 
